<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../../common.jsp"%>
<!doctype html>
<html>
<head>
<title>银行卡</title>
</head>
<body ontouchstart id="body">

	<header class="contHeader">
		<div class="contOHeader" style="z-index: 1000">
			<h1>绑定银行卡</h1>
			<div class="contOHeadBack">
				<a href="javascript:gotoHtml('/money/withdrawals.html');"><img
					src="${staticPath}/images/back2.png"></a>
			</div>

		</div>
	</header>
	<c:forEach items="${bankcardList}" var="bankcard">
		<div class="weui_cells weui_cells_access" style="padding-left: 15px;" id="${bankcard.id}">
			<a class="weui_cell"
				href="javascript:selectBankcard(${bankcard.id});">
				<div class="weui_cell_bd weui_cell_primary">
					<h5>${bankcard.bank.name }</h5>
					<p class="font12">卡号：${bankcard.bankCode }</p>
					<p class="font12">开户支行：${bankcard.branch }</p>
				</div>
			</a>
			<div class="button_sp_area">
				<a href="javascript:editBankcard(${bankcard.id});"
					class="weui_btn weui_btn_mini weui_btn_primary">编辑</a>
				<c:if test="${ bankcard.isDefault==0}">
					<a href="javascript:deleteBankcard('${bankcard.id}');"
						class="weui_btn weui_btn_mini weui_btn_primary">删除</a>
					<a href="javascript:defaultBankcard(${bankcard.id});"
						class="weui_btn weui_btn_mini weui_btn_primary">设为默认</a>
				</c:if>
				<c:if test="${ bankcard.isDefault==1}">
					<a href="javascript:;"
						class="weui_btn weui_btn_mini weui_btn_default">当前默认</a>
				</c:if>
			</div>
		</div>	
	</c:forEach>
		<c:if test="${bankcardList.size()==0}">
			<div class="bd">
				<div class="index-pic"
					style="padding-top: 120px; text-align: center;">
					<img src="${staticPath}/images/banknull.png"
						style="width: 80px; height: 100px;">
				</div>
				<div style="text-align: center; width: 100%; color: #999;">
					<p>暂无银行卡</p>
					<p>心爱的钞票进谁的腰包？</p>
				</div>
			</div>
		</c:if>
	<div style="padding-bottom: 40px;"></div>
	<div class="tabm">
		<a class="tabright" href="javascript:createBankcard();"
			 style="width: 100%;">绑定新卡</a>
	</div>
</body>

<script type="text/javascript" src="${staticPath}/js/app/bankcard/bankcardlist.js"></script>
<script type="text/javascript" src="${staticPath}/js/app/bankcard/bankcard.js"></script>
</html>

